import Vue from 'vue'
import Router from 'vue-router'
import home from '../pages/home'

Vue.use(Router)

export default new Router({
  linkActiveClass:'is-active',
  routes: [
    {  
      path: '/home',
      component: home,  
    },
     {
      path: "/data",
      component: resolve => {
        require(['../pages/data'], resolve)
      }
    },
    {
      path: "/user",
      component: resolve => {
        require(['../pages/user'], resolve)
      }
    },
    {
      path: "/good",
      component: resolve => {
        require(['../pages/good'], resolve)
      }
    },
   
     {
      path: "/datails/:newsID",
      component: resolve => {
        require(['../pages/datails'], resolve)
      }
    },
      {
      path: "/login",
      component: resolve => {
        require(['../pages/login'], resolve)
      }
    },
    {
      path: "/",
      redirect: '/home'
    },
  ]
})
